package Atest;

/**
 * @Author wangzhipeng
 * @Date 2020-08-26 2:43 下午
 * @Description
 */
public class Test2 {
    public static void main(String[] args) {
        MyChild c = new MyChild();
    }
}
class MyFather{
    public MyFather() {
        System.out.println("父类无参构造");
    }
    public MyFather(String name) {
        System.out.println("父类有参构造");
    }
}
class MyChild extends MyFather{
    public MyChild() {
        this("fff");
        System.out.println("子类无参构造");
    }
    public MyChild(String name) {
        //super("dd");
        System.out.println("子类有参构造");
    }
}